#include "NewsGroupManager.h"

#include <Assert.h>
#include <Store/NewsGroupTable.h>
#include <Store/TempUploadsTable.h>

using namespace TCServer::Store;

namespace TCServer
{
	namespace Manager
	{
		NewsGroupManager::NewsGroupManager()
		{
		}
		NewsGroupManager::~NewsGroupManager()
		{
		}

		quint64 NewsGroupManager::insert(const Type::NewsGroup &newsGroup)
		{
			return NewsGroupTable::insert(newsGroup);
		}

		void NewsGroupManager::update(const Type::NewsGroup &newsGroup)
		{
			return NewsGroupTable::update(newsGroup);
		}

		void NewsGroupManager::remove(quint64 id)
		{
			return NewsGroupTable::remove(id);
		}

		QList<TCServer::Type::NewsGroup> NewsGroupManager::queryAll()
		{
			return NewsGroupTable::queryAll();
		}

		TCServer::Manager::NewsGroupManager* NewsGroupManager::instance()
		{
			static NewsGroupManager *_instance = new NewsGroupManager;
			return _instance;
		}
	}
}

